package com.bff.mpd.musicjukebox.ui.components;

import java.util.ArrayList;

import javax.swing.table.DefaultTableModel;

/**
 * @author bill
 */
public class SongTableModel extends DefaultTableModel {
   private boolean editable = false; //default editable to false.
   private ArrayList editcolumn = new ArrayList();

   public SongTableModel() {

   }

   public void setColEditable(int colnum, boolean editable) {
      editcolumn.add( (colnum - 1), editable);
   }

    @Override
   public boolean isCellEditable(int row, int column) {
      return ( (Boolean) editcolumn.get(column)).booleanValue();
   }

   public boolean isEditable() {
      return editable;
   }

   public void setEditable(boolean value) {
      editable = value;
   }
}
